--- id: TASK-023 title: 'TUI: Countdown to next calendar event in subtitle' status: To Do assignee: [] created_date: '2026-06-12 04:21' labels: - tui - feature dependencies: [] priority: low ordinal: 23000 --- ## Description The subtitle bar currently shows `● 2:30 PM · Personal · flexoki`. Append the next upcoming calendar event and time until it starts: `● 2:30 PM · Standup in 42m · Personal · flexoki`. Implementation: - After `refresh_data()`, find the soonest upcoming (non-all-day) event from the calendar payload with `start > now` - Compute `delta = start - now` → format as "in Xm" (<1h), "in Xh Ym" (≥1h), "now" (<2m) - Update `_update_subtitle()` to include the event name (truncated to ~20 chars) and countdown - Refresh the countdown display every 60s via an existing or new lightweight timer (no re-fetch needed, just recompute from cached event data) - If no upcoming event within 24h, omit the field ## Acceptance Criteria - [ ] #1 Subtitle shows next event name and time-until when one exists within 24h - [ ] #2 Countdown updates every minute without re-fetching - [ ] #3 No event within 24h: subtitle unchanged from current format - [ ] #4 All-day events excluded from the countdown - [ ] #5 Event name truncated to avoid subtitle overflow